<template>
  <div>
    <pform ref="form" :model="form" lw="150">
      <el-form-item label="区域">
        <el-select class="w233" size="small" v-model="form.field1" placeholder="请选择区域">
            <el-option
              v-for="item in option"
              :key="item.value"
              :label="item.label"
              :value="item.value">
            </el-option>
          </el-select>
      </el-form-item>
      <el-form-item label="桶名称">
        <el-input class="w233" v-model="form.field2" size="small" placeholder="请输入"></el-input>
      </el-form-item>
      <el-form-item label="数据冗余存储策略">
        <el-radio-group v-model="form.field3">
            <el-radio :label="1">多AZ存储</el-radio>
            <el-radio :label="2">单AZ存储</el-radio>
          </el-radio-group>
      </el-form-item>
      <el-form-item label="默认存储类别">
        <el-radio-group v-model="form.field4">
            <el-radio :label="1">标准存储</el-radio>
            <el-radio :label="2">低频访问存储</el-radio>
            <el-radio :label="3">归档存储</el-radio>
          </el-radio-group>
      </el-form-item>
      <el-form-item label="桶策略">
        <el-radio-group v-model="form.field5">
            <el-radio :label="1">私有</el-radio>
            <el-radio :label="2">公共读</el-radio>
            <el-radio :label="3">公共读写</el-radio>
          </el-radio-group>
      </el-form-item>
      <el-form-item label="归档数据直读">
        <el-radio-group v-model="form.field6">
            <el-radio :label="1">开启</el-radio>
            <el-radio :label="2">关闭</el-radio>
          </el-radio-group>
      </el-form-item>
      <fbr></fbr>

      <el-form-item label="桶策略">
        <el-radio-group v-model="form.field7">
              <el-radio-button label="SSE-KMS"></el-radio-button>
              <el-radio-button label="SSE-OBS"></el-radio-button>
              <el-radio-button label="不加密"></el-radio-button>
            </el-radio-group>
      </el-form-item>
      <el-form-item label="加密密钥类型">
        <el-radio-group v-model="form.field8">
              <el-radio-button label="默认密钥"></el-radio-button>
            </el-radio-group>
      </el-form-item>
      <el-form-item label="WORM">
        <el-radio-group v-model="form.field9">
            <el-radio :label="1">开启</el-radio>
            <el-radio :label="2">关闭</el-radio>
          </el-radio-group>
      </el-form-item>
      <el-form-item label="桶配额">
         <el-input-number class="w215 mr3" v-model="form.field10" size="small" :min="1"></el-input-number>GB
      </el-form-item>
      <el-form-item label="标签">
        <div style="min-height: 80px;">
          <div class="flex-c">
            <pbtn @click="hasTag=true" class="mr10"></pbtn>
            <div>
              添加标签
            </div>
          </div>
          <div >
            <div class="flex-c" v-show="hasTag">
              <pbtn @click="hasTag=false" iname="minus" class="mr10"></pbtn>
              <el-input size="small" style="width:233px;margin-right: 40px;" v-model="form.field11" placeholder="请输入标签键"></el-input>
              <el-input size="small" style="width:233px;" v-model="form.field12" placeholder="请输入标签值"></el-input>
            </div>
          </div>
        </div>
      </el-form-item>
    </pform>
  </div>
</template>

<script>
export default{
    data() {
      return {
        hasTag:false,
        form: {
          field1:'',
          field2:"",
          field3:1,
          field4:1,
          field5:1,
          field6:1,
          field7:'SSE-KMS',
          field8:'默认密钥',
          field9:1,
          field10:'',
          field11:'',
          field12:'',
          field13:'',
          field14:'',
          field15:'',
          field16:'',
          field17:'',
          field18:'',
          field19:'',
        },
        option:[
          {label:'东南中心',value:'1111'},
          {label:'南方中心',value:'2222'},
          {label:'北方中心',value:'3333'},
        ],
        option1:[
          {label:'vpc-default（192.168.0.0/16 ）',value:'1111'},
          {label:'vpc-defadsj（192.168.0.0/16 ）',value:'2222'},
          {label:'虚拟云名称（主网段）',value:'3333'},
        ],
        option2:[
          {label:'自动分配IP',value:'1111'},
          {label:'手动分配IP',value:'2222'},
        ],
        option3:[
          {label:'Sys-FullAccess',value:'1111'},
          {label:'Sys-FullAccess',value:'2222'},
          {label:'安全组名称',value:'3333'},
        ],
      }
    },
    methods: {
      init() {},
      getFormData() {
        return JSON.parse(JSON.stringify(this.form))
      },
    }

  }
</script>

<style scoped lang="less">
</style>
